package cn.stylefeng.guns.modular.system.service.impl;

import cn.stylefeng.guns.modular.system.dao.ProxyIncomeMapper;
import cn.stylefeng.guns.modular.system.entity.ProxyIncome;
import cn.stylefeng.guns.modular.system.service.ProxyIncomeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ProxyIncomeServiceImpl
 * @Author lzy
 * @Date 2020/2/9 16:42
 * @VERSION 1.0
 **/
@Service
public class ProxyIncomeServiceImpl extends ServiceImpl<ProxyIncomeMapper, ProxyIncome> implements ProxyIncomeService {
    @Override
    public List<String> findIdsByProxyId(Long id) {
        return baseMapper.findIdsByProxyId(id);
    }

    @Override
    public List<Map<Object, Object>> findList(String startTime, String endTime, String proxyName, List<String> userIds) {
        if(!ObjectUtils.isEmpty(proxyName)){
            proxyName = "%" + proxyName + "%";
        }
        return baseMapper.findList(startTime, endTime, proxyName, userIds);
    }
}
